feat(ci): Add Claude Code workflow - #1185
Conversation
Two jobs in one workflow: - `claude` — responds to @claude mentions in issues, PR comments and reviews. - `review` — auto-reviews a PR when the `ready-for-review` label is added, reusing the repo's own checklist in .claude/commands/pr-review.md so the bot review and the local /pr-review pass apply the same conventions. Requires an ANTHROPIC_API_KEY repository secret and the Claude GitHub App installed on the org. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenAPI changes ⚪ No API surface changesNote This PR does not modify the API contract.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
ready-for-reviewis the same label CodeRabbit uses (.coderabbit.yaml), so labelling a PR now fires both reviewers. If that turns out to be noise, drop one — changing the label here is a one-line edit.concurrencywithcancel-in-progresson the review job keeps a remove/re-add of the label from stacking runs.pull_requesttrigger doesn't expose secrets to forks, so the review job silently no-ops there. Deliberate —pull_request_targetwould expose the key to untrusted code.actions/checkout@v7matchescontinuous-integration.yml(upstream's example is on v6).Stophook (wiki-update.sh) also applies to these runs. On the read-only review job it exits 0; on theclaudejob it will nudge for adocs/wiki/update when the change is structural, which is the intended behaviour.Original PR description
Issue
N/A — infra setup.
Summary
Adds
.github/workflows/claude.ymlwith two jobs:claude@claudein an issue body/title, a PR comment, or a reviewreviewready-for-reviewlabel added to a PRThe
reviewjob doesn't carry its own review criteria. It reads.claude/commands/pr-review.mdfrom the checkout and follows it from "What to check" onward, so the bot review and a locally-run/pr-reviewapply the same conventions and output format. Updating the checklist updates both.It skips that file's "Gather the diff" section (which assumes a local clone with full history) and uses
gh pr diff/gh pr viewinstead — the checkout isfetch-depth: 1.Before this can run
ProjectTech4DevAIorg — needs an org owner, not just repo admin.ANTHROPIC_API_KEYas a repository (or org) Actions secret.Until both are done, the jobs are inert — nothing else in CI is affected.
Notes
ready-for-reviewis the same label CodeRabbit uses (.coderabbit.yaml), so labelling a PR now fires both reviewers. If that turns out to be noise, drop one — changing the label here is a one-line edit.concurrencywithcancel-in-progresson the review job keeps a remove/re-add of the label from stacking runs.pull_requesttrigger doesn't expose secrets to forks, so the review job silently no-ops there. Deliberate —pull_request_targetwould expose the key to untrusted code.actions/checkout@v7matchescontinuous-integration.yml(upstream's example is on v6).Stophook (wiki-update.sh) also applies to these runs. On the read-only review job it exits 0; on theclaudejob it will nudge for adocs/wiki/update when the change is structural, which is the intended behaviour.Checklist
fastapi run --reload app/main.py— N/A, CI-only change